/**
 * Project Name:common-algorithm
 * File Name:QuickIntegerArraySort.java
 * Package Name:com.sf.iguess.survey
 * Date:2017年12月5日下午6:56:44
 * Copyright (c) 2017, 01135912 All Rights Reserved.
 *
*/

package com.sf.iguess.survey;

/**
 * ClassName:QuickIntegerArraySort <br/>
 * Function: ADD FUNCTION. <br/>
 * Reason: ADD REASON. <br/>
 * Date: 2017年12月5日 下午6:56:44 <br/>
 * 
 * @author 01135912
 * @version
 * @since JDK 1.7
 * @see
 */
public class QuickIntegerArraySort
{
    
    private QuickIntegerArraySort()
    {
        
    }
    
    public static void sort(Integer[] countList)
    {
        int countValueSize = countList.length;
        for (int index = 0; index < countValueSize; index++)
        {
            for (int lastIndex = countValueSize - 1; lastIndex > index; lastIndex--)
            {
                int orderIndexValue = countList[index];
                int eachIndex = countList[lastIndex];
                if (orderIndexValue <= eachIndex)
                {
                    countList[index] = eachIndex;
                    countList[lastIndex] = orderIndexValue;
                }
            }
        }
    }
}
